﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using Com.Charence.PassManager.BusinessComponents;
using Microsoft.AspNet.SignalR;
using Microsoft.AspNet.SignalR.Hubs;

namespace Com.Charence.PassManager.UI.Web.Common
{
    [HubName("authHub")]
    public class AuthenticateHub : Hub
    {
        public void Ready(string token)
        {
            var loginBC = new AuthenticateBC();
            if (loginBC.ConnentHub(token, Context.ConnectionId))
            {
                Clients.Caller.ShowQR();
            }
            else
            {
                Clients.Caller.DisableQR();
            }
        }
    }
}